/*
 * RtpPacketWriter.h
 *
 *  Created on: 2020年3月12日
 *      Author: chuanjiang.zh
 */

#ifndef RTPPACKETWRITER_H_
#define RTPPACKETWRITER_H_

#include "BasicType.h"
#include <string>

#include "RtpPacker.h"
#include "TFileWriter.h"
#include <memory>

typedef std::shared_ptr< av::RtpUnPacker >  RtpUnPackerPtr;


class RtpPacketWriter
{
public:
	RtpPacketWriter();
	virtual ~RtpPacketWriter();

    bool open(const std::string& codec, const std::string& filepath);
    void close();

    bool write(const uint8_t* data, int size);


protected:

protected:
    comn::FileWriter    m_writer;
    RtpUnPackerPtr  m_unpacker;

};

#endif /* RTPPACKETWRITER_H_ */
